export type AnimeSummaryType = {
  title: string
  season: string
  subtitle: string
  description: string
  poster: string
  year: string
  month: string
  type: string
  backgroundURL: string
  backgroundColor: string
}

export type AnimeOverViewType = {
  id: bigint
  poster: string
  title: string
  subtitle: string
}

export type ResponseType<T> = {
  code: bigint
  msg: string
  data: T
}

export type torrentFileType = {
  name: string
  url: string
  size: string
  hash: string
  fileName: string
  savePath: string
  extension: string
  episode: bigint
  group: string
  isSelected: boolean
  isCollection: boolean
}

export type SubscribeType = {
  title: string
  searchedName: string[]
  selectedSearchName: string
  seasonNumber: number
  season: string
  url: string
  excludePatterns: string[]
  includePatterns: string[]
  fileList: torrentFileType[]
}

export enum DownloadStatus {
  DOWNLOADING,
  UPLOADING,
  COMPLETED,
  MISSING_FILE,
  PAUSED_UP,
  QUEUED_UP,
  STALLED_UP,
  CHECKING_UP,
  FORCED_UP,
  ALLOCATING,
  META_DL,
  PAUSED_DL,
  QUEUED_DL,
  STALLED_DL,
  CHECKING_DL,
  FORCED_DL,
  CHECKING_RESUME_DATA,
  MOVING,
  UNKNOWN,
  ERROR,
  FINISHED,
}

export type TokenDataType = {
  token: string
  longlivedToken: string
}

export type DownloadInfoType = {
  torrentName: string
  hash: string
  estimatedTime: bigint
  downloadedSize: bigint
  totalSize: bigint
  downloadSpeed: bigint
  status: DownloadStatus
}

export type RssDownloadInfoType = {
  id: bigint
  url: string
  rssName: string
  includePatterns: string[]
  excludePatterns: string[]
  downloadInfos: DownloadInfoType[]
}
